package oop2.Task2;

public class Car {
    String brand;
    int price;  //单位是万
    double paiLiang;
    int seatNumber;

    public Car(String brand, int price, double paiLiang, int seatNumber) {
        this.brand = brand;
        this.price = price;
        this.paiLiang = paiLiang;
        this.seatNumber = seatNumber;
    }

    public void show() {
        System.out.println("汽车品牌:"+brand+",价格:"+price+"万,排量:"+paiLiang+",座位数:"+seatNumber);
    }

    public void start() {
        System.out.println(brand + "汽车启动了");
    }

    public void brake() {
        System.out.println(brand + "汽车刹车了");
    }
}
